<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <script src="js/react.min.js"></script>
    <script src="js/react-dom.min.js"></script>
</head>
<body>
<div class="app"></div>
</body>
</html>
<script>
    //组件的propTypes
    var Component = React.createClass({
        propTypes:{
            name:React.PropTypes.string.isRequired
        },
        render:function(){
            return React.DOM.div({}
                    ,"My name is "+this.props.name);
        }
    });
    ReactDOM.render(
            React.createElement(
                    Component,
                    {
                        name:123
                    }
            ),
            document.getElementsByClassName("app")[0]
    );

</script>